﻿using com.guojin.core.io.message;
using com.guojin.core.io;
using System;

namespace com.guojin.mj.net.message.login
{
    public class AllianceOpinion : Message
    {
        public static int TYPE = 7;
        public static int ID = 114;

        /**是否同意   0代表同意  1代表不同意*/
        private int result;
        /***用户id*/
        private int userid;
        private string clubid;

        public int Result
        {
            get
            {
                return result;
            }

            set
            {
                result = value;
            }
        }

        public string Clubid
        {
            get
            {
                return clubid;
            }

            set
            {
                clubid = value;
            }
        }

        public static AllianceOpinion create(int ret, int id, string clubids)
        {
            AllianceOpinion co = new AllianceOpinion();
            co.result = ret;
            co.userid = id;
            co.clubid = clubids;
            return co;
        }

        public void decode(Input _in)
        {

        }

        public void encode(Output _out)
        {
            _out.writeInt(result);
            _out.writeInt(userid);
            _out.writeString(clubid);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "result" + result + "userid" + userid + "clubid" + clubid;
        }
    }
}
